import {baseEffects, baseReducers, baseState} from "../../../../../models/baseModel";
import moment from "moment";

export default {
  namespace: 'patientInfo',

  state: {
    ...baseState,
    patientInfo: {},
    uploadStatistics: [],
  },

  reducers: {
    ...baseReducers
  },

  effects: {

    ...baseEffects,

    * getPatientInfo({payload}, {put}) {

      const {patientId} = payload;

      const patientInfo = {
        patientId: patientId,
        name: "张三",
        sex: '男',
        age: 45,
        channel: '肌酐',
        simpleId: '123456',
        collectTime: moment().format('YYYY-MM-DD HH:mm:ss'),
        cap: '标准',
        finishTime: moment().format('YYYY-MM-DD HH:mm:ss'),
      };

      yield put({
        type: 'initState',
        payload: {patientInfo: patientInfo}
      });
    },

  }

}

function getBaseUrl() {
  return "/device/bp/";
}

